<template>
  <div class="show-com">
    <div v-for="(item, index) in comments" class="comment-item">
      <div class="item-title">
        <img :src="item.avatar" alt="" />
        <div class="uname" :style="{ color: item.color }">
          {{ item.nickname }}
        </div>
      </div>
      <div class="content" :style="{ color: item.color }">
        {{ item.message }}
      </div>
      <div class="show-img">
        <div class="show-img-item" v-for="img in item.img">
          <img :src="img" alt="" />
        </div>
      </div>
      <div class="item-bottom">
        <div><img src="../../assets/img/square/添加 (1).svg" alt="" /></div>
        <div><img src="../../assets/img/square/评论.svg" alt="" /></div>
        <div class="bottom-item">
          <img src="../../assets/img/square/点赞.svg" alt="" />
          <span>1</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "",
  props: {
    comments: {
      type: Array,
      default: []
    }
  },
  data() {
    return {};
  },
  computed: {
    
  },
  methods: {}
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.show-com {
  margin-top: 44px;
  margin-bottom: 40px;
}
.comment-item {
  padding: 10px 8px 10px 8px;
  background-color: #fff;
  border-bottom: 10px solid rgb(177, 175, 175);
}
.item-title {
  /* line-height: 45px; */
  display: flex;
}
.item-title img {
  height: 40px;
  width: 40px;
  border-radius: 50%;
}
.uname {
  font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
  font-size: 16px;
  margin-left: 5px;
  margin-top: 5px;
}
.content {
  padding-top: 5px;
}
.item-bottom {
  margin-top: 10px;
  display: flex;
}
.item-bottom img {
  width: 24px;
}
.item-bottom div {
  text-align: center;
  flex: 1;
}
.show-img {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  margin-top: 20px;
  width: 100%;
}
.show-img-item {
  flex: 1;
  width: 100%;
  /* height: 100px; */
}
.show-img img {
  width: 100%;
  height: 100%;
  
}
</style>
